package com.xst.business.impl;

import java.util.List;

import org.hibernate.Session;

import com.xst.business.ProductDao;
import com.xst.model.Customer;
import com.xst.model.Product;
import com.xst.util.BaseHibernateDAO;

public class ProductDaoImpl extends BaseHibernateDAO implements ProductDao {
	private Session session= null;
	private List<Product> list = null;
	
	public List<Product> getall() {
		try {
			session = super.getSession();
			String hql = "from Product";
			list = session.createQuery(hql).list();
		} catch (Exception e) {
			e.printStackTrace();
		}finally{
			session.close();
		}
		return list;
	}

}
